<%-- 
    Document   : enrollbillpay
    Created on : Jan 12, 2011, 2:34:41 PM
    Author     : 253961
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<jsp:useBean id="enrollHandler" class="test.EnrollFormBean" scope="request"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Welocome TO Bank of ASV</title>
        <link href="templatemo_style.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
        <%@include file="connectionvariables.jsp" %>
        <%
                    Connection con = null;


                    String driver = "oracle.jdbc.OracleDriver";
                    try {

                        Class.forName(driver);
                        //System.out.println("hi");
                        con = DriverManager.getConnection("jdbc:oracle:thin:@" + dblocal + ":1521:" + db + "", dbuser, dbpass);

                        Statement st12 = con.createStatement();

                        ResultSet res22 = st12.executeQuery("select * from onbill_customer where billstatus=1 and custid=" + custid);
                        if (res22.next()) {
                            response.sendRedirect("enrollsuccess.jsp");

                        }
                    } catch (SQLException e) {
                        System.out.println("Error in Sql");
                    }


        %>




        <% if (((String) session.getAttribute("custid")) == null) {
                        response.sendRedirect("index.jsp");
                    }
        %>
        <div id="user" align="center" style="background-color:#A40F0F">
            <label style="color:#FFCC11">Asv Bank Welcomes</label>
            <label style="color:#ffffff" > <%=session.getAttribute("fna")%></label><br/>
            <label style="color:#FFCC11"> Current Account No: </label>
            <label style="color:#ffffff"> <%=session.getAttribute("default")%></label>
            <br/>      <span style="float:right;background-color:#BEC41A"><a href="logout.jsp"><label style="color:white;font-size:13px;"> LOGOUT</label></a></span>
            <span style="float:left;background-color: #BEC41A"><a href="addacc.jsp"><label style="color:white;font-size:13px;"> ADD ACCOUNT</label></a></span>
        </div>
        <div id="templatemo_site_title_bar_wrapper">
            <div id="templatemo_site_title_bar">
                <div id="site_title">
                    <h1><a href="#">
                            <!-- Work Template <span>free css templates</span> -->
                            <img src="images/templatemo_logo.png" alt="myWORK" />
                            <span>ASV Bank</span>

                        </a></h1>
                </div>



            </div> <!-- end of templatemo_site_title_bar -->
        </div> <!-- end of templatemo_site_title_bar_wrapper -->

        <div id="templatemo_menu_wrapper">

            <div id="templatemo_menu">
                <ul>
                    <li><a href="home.jsp" >Home</a></li>
                    <li><a href="profile.jsp" >Profile</a></li>
                    <li><a href="accountdet.jsp">Account Details</a></li>
                    <li><a href="enrollbillpay.jsp" class="current">Bill Payment Registration</a></li>
                    <li><a href="enrollaccount.jsp">Enroll/Un-enroll Account</a></li>
                    <li><a href="makedefault.jsp">Edit Account</a></li>
                    <li><a href="regpayee.jsp">Register Payee</a></li>
                    <li><a href="transact.jsp">Pay Bill</a></li>
                </ul>
            </div> <!-- end of templatemo_menu -->

        </div> <!-- end of templatemo_menu_wrapper -->



        <div id="templatemo_content">
            <table cellpadding="3" cellspacing="3"  width="800px" border="1" align="center">

                <form ACTION="enrollprocess.jsp" METHOD="POST">
                    <th bgcolor="#880000" colspan="4">
                        <label>BillPay Enrollment</label>
                        <br/>
                        <font size=2 color="red"><sup>*</sup> Required Fields</font>
                    </th>
                    <tr>
                        <td valign="top" colspan="2" bgcolor="#888000">
                            <label>First Name<sup>*</sup></label>

                        </td>
                        <td valign="top" colspan="2" bgcolor="#888000">
                            <input type="text" name="firstName" value='<%=enrollHandler.getFirstName()%>' size=30 maxlength=20>
                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("firstname")%></font>
                                    </td>

                                    </tr>
                                    <tr>
                                        <td valign="top" colspan="2" bgcolor="#888000">
                                            <label>Last Name<sup>*</sup></label>

                                        </td>
                                        <td valign="top" colspan="2" bgcolor="#888000">
                                            <input type="text" name="lastName" value='<%=enrollHandler.getLastName()%>' size=30 maxlength=20>
                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("lastname")%></font>
                                                    </td>

                                                    </tr>
                                                    <tr>
                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                            <label>Email Id<sup>*</sup></label>
                                                        </td>

                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                            <input type="text" name="emailId" value='<%=enrollHandler.getEmailId()%>' size=30 maxlength=20>
                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("emailid")%></font>
                                                                    </td>

                                                                    </tr>
                                                                    <tr>
                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                            <label>Bill Pay Address<sup>*</sup></label>
                                                                        </td>
                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                            <input type="text" name="billAddress" value='<%=enrollHandler.getBillAddress()%>' size=30 maxlength=20>
                                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("billaddr")%></font>
                                                                                    </td>

                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                            <label>Security Question<sup>*</sup></label>
                                                                                        </td>
                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                            <input type="text" name="seques" value='<%=enrollHandler.getSeques()%>' size=30 maxlength=20>
                                                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("seques")%></font>
                                                                                                    </td>

                                                                                                    </tr>
                                                                                                    <tr>
                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                            <label>Security Answer<sup>*</sup></label>
                                                                                                        </td>
                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                            <input type="text" name="secans" value='<%=enrollHandler.getSecans()%>' size=30 maxlength=20>
                                                                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("secans")%></font>
                                                                                                                    </td>

                                                                                                                    </tr>
                                                                                                                    <tr>
                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                            <label>Bill Pay Id<sup>*</sup></label>
                                                                                                                        </td>
                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                            <input type="text" name="billpayid" value="<%=enrollHandler.getBillpayid()%>" size=30 maxlength=20>
                                                                                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("billid")%></font>
                                                                                                                                    </td>
                                                                                                                                    </tr>


                                                                                                                                    <tr>
                                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                                            <label>Password<sup>*</sup></label>
                                                                                                                                        </td>
                                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                                            <input type="text" name="password" value="<%=enrollHandler.getPassword()%>" size=30 maxlength=20>
                                                                                                                                                <br><font size=2 color=red><%=enrollHandler.getErrorMsg("cnfpassword")%></font>
                                                                                                                                                    </td>
                                                                                                                                                    </tr>
                                                                                                                                                    <tr>
                                                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                                                            <label>Confirm Password<sup>*</sup></label>
                                                                                                                                                        </td>
                                                                                                                                                        <td valign="top" colspan="2" bgcolor="#888000">
                                                                                                                                                            <input type="password" name="cnfpass" value="" size=32 maxlength=20/>
                                                                                                                                                        </td>
                                                                                                                                                    </tr>


                                                                                                                                                    <tr>
                                                                                                                                                        <td>
                                                                                                                                                            <font size="4" color="red"> <%=enrollHandler.getErrorMsg("database")%></font>
                                                                                                                                                        </td>
                                                                                                                                                    </tr>



                                                                                                                                                    <tr bgcolor="#888000" >
                                                                                                                                                        <td colspan="4">
                                                                                                                                                            <INPUT TYPE="image" SRC="images/submit.jpg" HEIGHT="30" WIDTH="100" BORDER="0" ALT="Submit Form">
                                                                                                                                                        </td>
                                                                                                                                                    </tr>
                                                                                                                                                    </form>


                                                                                                                                                    </table>

                                                                                                                                                    </div> <!-- end of templatemo_content -->



                                                                                                                                                    <div id="templatemo_content_bottom"></div>

                                                                                                                                                    <div id="templatemo_footer_wrapper">

                                                                                                                                                    </div> <!-- end of footer wrapper -->
                                                                                                                                                    </body>
                                                                                                                                                    </html>